window.app = {
	serverUrl :'http://192.168.31.27:8080',
	imgServerUrl : '',
	
	isNotNull: function(str) {
		if(str != null && str != "" && str != undefined) {
			return true;
		}
		return false;
	},

	/**
	 * 封装消息提示框 
	 * */
	showToast: function(msg, type) {
		plus.nativeUI.toast(msg, {
			icon: "image/" + type +".png",
			verticalAlign: "center"
		})
	},	
	/*
	 * 保存全局user对象
	 * */
	setGlobalUserInfo : function(user) {
		let userInfoStr = JSON.stringify(user);
		plus.storage.setItem("userInfo",userInfoStr)
	},
	getGlobalUserInfo : function(user){
		let userInfoStr = plus.storage.getItem("userInfo");
		return JSON.parse(userInfoStr);
	}
}